﻿package mortal.game.view.copy.uniqueBoss.view
{
    import flash.events.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class UniqueBossIcon extends ActionBaseIcon
    {
        private static var _instance:UniqueBossIcon;

        public function UniqueBossIcon()
        {
            super(ResFileConst.UniqueBossIcon);
            this.name = "UniqueBossIcon";
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            if (UniqueBossMainWin.instance.isHide)
            {
                UniqueBossMainWin.instance.show();
            }
            else
            {
                UniqueBossMainWin.instance.hide();
            }
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl();
            return;
        }// end function

        public static function get instance() : UniqueBossIcon
        {
            if (!_instance)
            {
                _instance = new UniqueBossIcon;
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

        public static function isViewShow() : Boolean
        {
            return hasInstance() && !_instance.isHide;
        }// end function

    }
}
